// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.
#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]

/// Implements a client for the GKE Multi-Cloud API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_gkemulticloud_v1::client::AttachedClusters;
/// let client = AttachedClusters::builder().build().await?;
/// // use `client` to make requests to the GKE Multi-Cloud API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The AttachedClusters API provides a single centrally managed service
/// to register and manage Anthos attached clusters that run on customer's owned
/// infrastructure.
///
/// # Configuration
///
/// To configure `AttachedClusters` use the `with_*` methods in the type returned
/// by [builder()][AttachedClusters::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://gkemulticloud.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::attached_clusters::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::attached_clusters::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `AttachedClusters` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `AttachedClusters` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct AttachedClusters {
    inner: std::sync::Arc<dyn super::stub::dynamic::AttachedClusters>,
}

impl AttachedClusters {
    /// Returns a builder for [AttachedClusters].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_gkemulticloud_v1::client::AttachedClusters;
    /// let client = AttachedClusters::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::attached_clusters::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::attached_clusters::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::AttachedClusters + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::AttachedClusters>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::AttachedClusters> {
        super::transport::AttachedClusters::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::AttachedClusters> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::AttachedClusters::new)
    }

    /// Creates a new
    /// [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
    /// on a given Google Cloud Platform project and region.
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AttachedCluster]: crate::model::AttachedCluster
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_attached_cluster(
        &self,
    ) -> super::builder::attached_clusters::CreateAttachedCluster {
        super::builder::attached_clusters::CreateAttachedCluster::new(self.inner.clone())
    }

    /// Updates an
    /// [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].
    ///
    /// [google.cloud.gkemulticloud.v1.AttachedCluster]: crate::model::AttachedCluster
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_attached_cluster(
        &self,
    ) -> super::builder::attached_clusters::UpdateAttachedCluster {
        super::builder::attached_clusters::UpdateAttachedCluster::new(self.inner.clone())
    }

    /// Imports creates a new
    /// [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
    /// by importing an existing Fleet Membership resource.
    ///
    /// Attached Clusters created before the introduction of the Anthos Multi-Cloud
    /// API can be imported through this method.
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AttachedCluster]: crate::model::AttachedCluster
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn import_attached_cluster(
        &self,
    ) -> super::builder::attached_clusters::ImportAttachedCluster {
        super::builder::attached_clusters::ImportAttachedCluster::new(self.inner.clone())
    }

    /// Describes a specific
    /// [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.
    ///
    /// [google.cloud.gkemulticloud.v1.AttachedCluster]: crate::model::AttachedCluster
    pub fn get_attached_cluster(&self) -> super::builder::attached_clusters::GetAttachedCluster {
        super::builder::attached_clusters::GetAttachedCluster::new(self.inner.clone())
    }

    /// Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]
    /// resources on a given Google Cloud project and region.
    ///
    /// [google.cloud.gkemulticloud.v1.AttachedCluster]: crate::model::AttachedCluster
    pub fn list_attached_clusters(
        &self,
    ) -> super::builder::attached_clusters::ListAttachedClusters {
        super::builder::attached_clusters::ListAttachedClusters::new(self.inner.clone())
    }

    /// Deletes a specific
    /// [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AttachedCluster]: crate::model::AttachedCluster
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_attached_cluster(
        &self,
    ) -> super::builder::attached_clusters::DeleteAttachedCluster {
        super::builder::attached_clusters::DeleteAttachedCluster::new(self.inner.clone())
    }

    /// Returns information, such as supported Kubernetes versions, on a given
    /// Google Cloud location.
    pub fn get_attached_server_config(
        &self,
    ) -> super::builder::attached_clusters::GetAttachedServerConfig {
        super::builder::attached_clusters::GetAttachedServerConfig::new(self.inner.clone())
    }

    /// Generates the install manifest to be installed on the target cluster.
    pub fn generate_attached_cluster_install_manifest(
        &self,
    ) -> super::builder::attached_clusters::GenerateAttachedClusterInstallManifest {
        super::builder::attached_clusters::GenerateAttachedClusterInstallManifest::new(
            self.inner.clone(),
        )
    }

    /// Generates an access token for a cluster agent.
    pub fn generate_attached_cluster_agent_token(
        &self,
    ) -> super::builder::attached_clusters::GenerateAttachedClusterAgentToken {
        super::builder::attached_clusters::GenerateAttachedClusterAgentToken::new(
            self.inner.clone(),
        )
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::attached_clusters::ListOperations {
        super::builder::attached_clusters::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::attached_clusters::GetOperation {
        super::builder::attached_clusters::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::attached_clusters::DeleteOperation {
        super::builder::attached_clusters::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::attached_clusters::CancelOperation {
        super::builder::attached_clusters::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the GKE Multi-Cloud API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_gkemulticloud_v1::client::AwsClusters;
/// let client = AwsClusters::builder().build().await?;
/// // use `client` to make requests to the GKE Multi-Cloud API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The AwsClusters API provides a single centrally managed service
/// to create and manage Anthos clusters that run on AWS infrastructure.
///
/// # Configuration
///
/// To configure `AwsClusters` use the `with_*` methods in the type returned
/// by [builder()][AwsClusters::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://gkemulticloud.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::aws_clusters::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::aws_clusters::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `AwsClusters` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `AwsClusters` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
#[deprecated]
pub struct AwsClusters {
    inner: std::sync::Arc<dyn super::stub::dynamic::AwsClusters>,
}

impl AwsClusters {
    /// Returns a builder for [AwsClusters].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_gkemulticloud_v1::client::AwsClusters;
    /// let client = AwsClusters::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::aws_clusters::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::aws_clusters::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::AwsClusters + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::AwsClusters>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::AwsClusters> {
        super::transport::AwsClusters::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::AwsClusters> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::AwsClusters::new)
    }

    /// Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
    /// resource on a given Google Cloud Platform project and region.
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AwsCluster]: crate::model::AwsCluster
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn create_aws_cluster(&self) -> super::builder::aws_clusters::CreateAwsCluster {
        super::builder::aws_clusters::CreateAwsCluster::new(self.inner.clone())
    }

    /// Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
    ///
    /// [google.cloud.gkemulticloud.v1.AwsCluster]: crate::model::AwsCluster
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn update_aws_cluster(&self) -> super::builder::aws_clusters::UpdateAwsCluster {
        super::builder::aws_clusters::UpdateAwsCluster::new(self.inner.clone())
    }

    /// Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
    /// resource.
    ///
    /// [google.cloud.gkemulticloud.v1.AwsCluster]: crate::model::AwsCluster
    #[deprecated]
    pub fn get_aws_cluster(&self) -> super::builder::aws_clusters::GetAwsCluster {
        super::builder::aws_clusters::GetAwsCluster::new(self.inner.clone())
    }

    /// Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources
    /// on a given Google Cloud project and region.
    ///
    /// [google.cloud.gkemulticloud.v1.AwsCluster]: crate::model::AwsCluster
    #[deprecated]
    pub fn list_aws_clusters(&self) -> super::builder::aws_clusters::ListAwsClusters {
        super::builder::aws_clusters::ListAwsClusters::new(self.inner.clone())
    }

    /// Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
    /// resource.
    ///
    /// Fails if the cluster has one or more associated
    /// [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AwsCluster]: crate::model::AwsCluster
    /// [google.cloud.gkemulticloud.v1.AwsNodePool]: crate::model::AwsNodePool
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn delete_aws_cluster(&self) -> super::builder::aws_clusters::DeleteAwsCluster {
        super::builder::aws_clusters::DeleteAwsCluster::new(self.inner.clone())
    }

    /// Generates an access token for a cluster agent.
    #[deprecated]
    pub fn generate_aws_cluster_agent_token(
        &self,
    ) -> super::builder::aws_clusters::GenerateAwsClusterAgentToken {
        super::builder::aws_clusters::GenerateAwsClusterAgentToken::new(self.inner.clone())
    }

    /// Generates a short-lived access token to authenticate to a given
    /// [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
    ///
    /// [google.cloud.gkemulticloud.v1.AwsCluster]: crate::model::AwsCluster
    #[deprecated]
    pub fn generate_aws_access_token(
        &self,
    ) -> super::builder::aws_clusters::GenerateAwsAccessToken {
        super::builder::aws_clusters::GenerateAwsAccessToken::new(self.inner.clone())
    }

    /// Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool],
    /// attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AwsCluster]: crate::model::AwsCluster
    /// [google.cloud.gkemulticloud.v1.AwsNodePool]: crate::model::AwsNodePool
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn create_aws_node_pool(&self) -> super::builder::aws_clusters::CreateAwsNodePool {
        super::builder::aws_clusters::CreateAwsNodePool::new(self.inner.clone())
    }

    /// Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
    ///
    /// [google.cloud.gkemulticloud.v1.AwsNodePool]: crate::model::AwsNodePool
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn update_aws_node_pool(&self) -> super::builder::aws_clusters::UpdateAwsNodePool {
        super::builder::aws_clusters::UpdateAwsNodePool::new(self.inner.clone())
    }

    /// Rolls back a previously aborted or failed
    /// [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] update request.
    /// Makes no changes if the last update request successfully finished.
    /// If an update request is in progress, you cannot rollback the update.
    /// You must first cancel or let it finish unsuccessfully before you can
    /// rollback.
    ///
    /// [google.cloud.gkemulticloud.v1.AwsNodePool]: crate::model::AwsNodePool
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn rollback_aws_node_pool_update(
        &self,
    ) -> super::builder::aws_clusters::RollbackAwsNodePoolUpdate {
        super::builder::aws_clusters::RollbackAwsNodePoolUpdate::new(self.inner.clone())
    }

    /// Describes a specific
    /// [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
    ///
    /// [google.cloud.gkemulticloud.v1.AwsNodePool]: crate::model::AwsNodePool
    #[deprecated]
    pub fn get_aws_node_pool(&self) -> super::builder::aws_clusters::GetAwsNodePool {
        super::builder::aws_clusters::GetAwsNodePool::new(self.inner.clone())
    }

    /// Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
    /// resources on a given
    /// [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
    ///
    /// [google.cloud.gkemulticloud.v1.AwsCluster]: crate::model::AwsCluster
    /// [google.cloud.gkemulticloud.v1.AwsNodePool]: crate::model::AwsNodePool
    #[deprecated]
    pub fn list_aws_node_pools(&self) -> super::builder::aws_clusters::ListAwsNodePools {
        super::builder::aws_clusters::ListAwsNodePools::new(self.inner.clone())
    }

    /// Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
    /// resource.
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AwsNodePool]: crate::model::AwsNodePool
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn delete_aws_node_pool(&self) -> super::builder::aws_clusters::DeleteAwsNodePool {
        super::builder::aws_clusters::DeleteAwsNodePool::new(self.inner.clone())
    }

    /// Gets the OIDC discovery document for the cluster.
    /// See the
    /// [OpenID Connect Discovery 1.0
    /// specification](https://openid.net/specs/openid-connect-discovery-1_0.html)
    /// for details.
    #[deprecated]
    pub fn get_aws_open_id_config(&self) -> super::builder::aws_clusters::GetAwsOpenIdConfig {
        super::builder::aws_clusters::GetAwsOpenIdConfig::new(self.inner.clone())
    }

    /// Gets the public component of the cluster signing keys in
    /// JSON Web Key format.
    #[deprecated]
    pub fn get_aws_json_web_keys(&self) -> super::builder::aws_clusters::GetAwsJsonWebKeys {
        super::builder::aws_clusters::GetAwsJsonWebKeys::new(self.inner.clone())
    }

    /// Returns information, such as supported AWS regions and Kubernetes
    /// versions, on a given Google Cloud location.
    #[deprecated]
    pub fn get_aws_server_config(&self) -> super::builder::aws_clusters::GetAwsServerConfig {
        super::builder::aws_clusters::GetAwsServerConfig::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::aws_clusters::ListOperations {
        super::builder::aws_clusters::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::aws_clusters::GetOperation {
        super::builder::aws_clusters::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::aws_clusters::DeleteOperation {
        super::builder::aws_clusters::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::aws_clusters::CancelOperation {
        super::builder::aws_clusters::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the GKE Multi-Cloud API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_gkemulticloud_v1::client::AzureClusters;
/// let client = AzureClusters::builder().build().await?;
/// // use `client` to make requests to the GKE Multi-Cloud API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The AzureClusters API provides a single centrally managed service
/// to create and manage Anthos clusters that run on Azure infrastructure.
///
/// # Configuration
///
/// To configure `AzureClusters` use the `with_*` methods in the type returned
/// by [builder()][AzureClusters::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://gkemulticloud.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::azure_clusters::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::azure_clusters::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `AzureClusters` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `AzureClusters` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
#[deprecated]
pub struct AzureClusters {
    inner: std::sync::Arc<dyn super::stub::dynamic::AzureClusters>,
}

impl AzureClusters {
    /// Returns a builder for [AzureClusters].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_gkemulticloud_v1::client::AzureClusters;
    /// let client = AzureClusters::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::azure_clusters::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::azure_clusters::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::AzureClusters + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::AzureClusters>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::AzureClusters> {
        super::transport::AzureClusters::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::AzureClusters> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::AzureClusters::new)
    }

    /// Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
    /// resource on a given Google Cloud project and region.
    ///
    /// `AzureClient` resources hold client authentication
    /// information needed by the Anthos Multicloud API to manage Azure resources
    /// on your Azure subscription on your behalf.
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureClient]: crate::model::AzureClient
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn create_azure_client(&self) -> super::builder::azure_clusters::CreateAzureClient {
        super::builder::azure_clusters::CreateAzureClient::new(self.inner.clone())
    }

    /// Describes a specific
    /// [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureClient]: crate::model::AzureClient
    #[deprecated]
    pub fn get_azure_client(&self) -> super::builder::azure_clusters::GetAzureClient {
        super::builder::azure_clusters::GetAzureClient::new(self.inner.clone())
    }

    /// Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
    /// resources on a given Google Cloud project and region.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureClient]: crate::model::AzureClient
    #[deprecated]
    pub fn list_azure_clients(&self) -> super::builder::azure_clusters::ListAzureClients {
        super::builder::azure_clusters::ListAzureClients::new(self.inner.clone())
    }

    /// Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
    /// resource.
    ///
    /// If the client is used by one or more clusters, deletion will
    /// fail and a `FAILED_PRECONDITION` error will be returned.
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureClient]: crate::model::AzureClient
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn delete_azure_client(&self) -> super::builder::azure_clusters::DeleteAzureClient {
        super::builder::azure_clusters::DeleteAzureClient::new(self.inner.clone())
    }

    /// Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
    /// resource on a given Google Cloud Platform project and region.
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureCluster]: crate::model::AzureCluster
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn create_azure_cluster(&self) -> super::builder::azure_clusters::CreateAzureCluster {
        super::builder::azure_clusters::CreateAzureCluster::new(self.inner.clone())
    }

    /// Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
    ///
    /// [google.cloud.gkemulticloud.v1.AzureCluster]: crate::model::AzureCluster
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn update_azure_cluster(&self) -> super::builder::azure_clusters::UpdateAzureCluster {
        super::builder::azure_clusters::UpdateAzureCluster::new(self.inner.clone())
    }

    /// Describes a specific
    /// [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureCluster]: crate::model::AzureCluster
    #[deprecated]
    pub fn get_azure_cluster(&self) -> super::builder::azure_clusters::GetAzureCluster {
        super::builder::azure_clusters::GetAzureCluster::new(self.inner.clone())
    }

    /// Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
    /// resources on a given Google Cloud project and region.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureCluster]: crate::model::AzureCluster
    #[deprecated]
    pub fn list_azure_clusters(&self) -> super::builder::azure_clusters::ListAzureClusters {
        super::builder::azure_clusters::ListAzureClusters::new(self.inner.clone())
    }

    /// Deletes a specific
    /// [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
    ///
    /// Fails if the cluster has one or more associated
    /// [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureCluster]: crate::model::AzureCluster
    /// [google.cloud.gkemulticloud.v1.AzureNodePool]: crate::model::AzureNodePool
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn delete_azure_cluster(&self) -> super::builder::azure_clusters::DeleteAzureCluster {
        super::builder::azure_clusters::DeleteAzureCluster::new(self.inner.clone())
    }

    /// Generates an access token for a cluster agent.
    #[deprecated]
    pub fn generate_azure_cluster_agent_token(
        &self,
    ) -> super::builder::azure_clusters::GenerateAzureClusterAgentToken {
        super::builder::azure_clusters::GenerateAzureClusterAgentToken::new(self.inner.clone())
    }

    /// Generates a short-lived access token to authenticate to a given
    /// [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureCluster]: crate::model::AzureCluster
    #[deprecated]
    pub fn generate_azure_access_token(
        &self,
    ) -> super::builder::azure_clusters::GenerateAzureAccessToken {
        super::builder::azure_clusters::GenerateAzureAccessToken::new(self.inner.clone())
    }

    /// Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool],
    /// attached to a given
    /// [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureCluster]: crate::model::AzureCluster
    /// [google.cloud.gkemulticloud.v1.AzureNodePool]: crate::model::AzureNodePool
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn create_azure_node_pool(&self) -> super::builder::azure_clusters::CreateAzureNodePool {
        super::builder::azure_clusters::CreateAzureNodePool::new(self.inner.clone())
    }

    /// Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
    ///
    /// [google.cloud.gkemulticloud.v1.AzureNodePool]: crate::model::AzureNodePool
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn update_azure_node_pool(&self) -> super::builder::azure_clusters::UpdateAzureNodePool {
        super::builder::azure_clusters::UpdateAzureNodePool::new(self.inner.clone())
    }

    /// Describes a specific
    /// [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureNodePool]: crate::model::AzureNodePool
    #[deprecated]
    pub fn get_azure_node_pool(&self) -> super::builder::azure_clusters::GetAzureNodePool {
        super::builder::azure_clusters::GetAzureNodePool::new(self.inner.clone())
    }

    /// Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
    /// resources on a given
    /// [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
    ///
    /// [google.cloud.gkemulticloud.v1.AzureCluster]: crate::model::AzureCluster
    /// [google.cloud.gkemulticloud.v1.AzureNodePool]: crate::model::AzureNodePool
    #[deprecated]
    pub fn list_azure_node_pools(&self) -> super::builder::azure_clusters::ListAzureNodePools {
        super::builder::azure_clusters::ListAzureNodePools::new(self.inner.clone())
    }

    /// Deletes a specific
    /// [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
    ///
    /// If successful, the response contains a newly created
    /// [Operation][google.longrunning.Operation] resource that can be
    /// described to track the status of the operation.
    ///
    /// [google.cloud.gkemulticloud.v1.AzureNodePool]: crate::model::AzureNodePool
    /// [google.longrunning.Operation]: longrunning::model::Operation
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn delete_azure_node_pool(&self) -> super::builder::azure_clusters::DeleteAzureNodePool {
        super::builder::azure_clusters::DeleteAzureNodePool::new(self.inner.clone())
    }

    /// Gets the OIDC discovery document for the cluster.
    /// See the
    /// [OpenID Connect Discovery 1.0
    /// specification](https://openid.net/specs/openid-connect-discovery-1_0.html)
    /// for details.
    #[deprecated]
    pub fn get_azure_open_id_config(&self) -> super::builder::azure_clusters::GetAzureOpenIdConfig {
        super::builder::azure_clusters::GetAzureOpenIdConfig::new(self.inner.clone())
    }

    /// Gets the public component of the cluster signing keys in
    /// JSON Web Key format.
    #[deprecated]
    pub fn get_azure_json_web_keys(&self) -> super::builder::azure_clusters::GetAzureJsonWebKeys {
        super::builder::azure_clusters::GetAzureJsonWebKeys::new(self.inner.clone())
    }

    /// Returns information, such as supported Azure regions and Kubernetes
    /// versions, on a given Google Cloud location.
    #[deprecated]
    pub fn get_azure_server_config(&self) -> super::builder::azure_clusters::GetAzureServerConfig {
        super::builder::azure_clusters::GetAzureServerConfig::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::azure_clusters::ListOperations {
        super::builder::azure_clusters::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::azure_clusters::GetOperation {
        super::builder::azure_clusters::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::azure_clusters::DeleteOperation {
        super::builder::azure_clusters::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::azure_clusters::CancelOperation {
        super::builder::azure_clusters::CancelOperation::new(self.inner.clone())
    }
}
